import request from "@/utils/request";
import type { RequestParams, ResponseData } from "./type";

// 分页列表
export const lmsSupplierConfigList = (data: RequestParams) => {
  return request<ResponseData<any>, any>({
    url: "/api/v1/lmsSupplierConfig/page",
    method: "post",
    data,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};
export const addlmsSupplierConfig = (data: object) => {
  return request<ResponseData<any>, any>({
    url: "/api/v1/lmsSupplierConfig/add",
    method: "post",
    data,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};
export const dellmsSupplierConfig = (id: number) => {
  return request<ResponseData<any>, any>({
    url: "/api/v1/lmsSupplierConfig/delete",
    method: "post",
    data: id,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};
export const FormlmsSupplierConfig = (id: number) => {
  return request<ResponseData<any>, any>({
    url: "/api/v1/lmsSupplierConfig/form",
    method: "post",
    data: id,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};

export const updatelmsSupplierConfig = (data: any) => {
  return request<ResponseData<any>, any>({
    url: "/api/v1/lmsSupplierConfig/update",
    method: "post",
    data,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};
export const lmsSupplierConfigOptions = (aesKeyByRsa: string) => {
  return request<ResponseData<any>, any>({
    url: "/api/v1/lmsSupplierConfig/options",
    method: "post",
    data: aesKeyByRsa,
    headers: {
      //需要加密的请求在头部塞入标识
      isEncrypt: 1,
    },
  });
};
